package com.clf.manager.util;

import com.baomidou.mybatisplus.extension.api.R;
import lombok.Data;

@Data
public class Result {
    private int state;
    private String msg;
    private Object data;

    public Result(int state, String msg, Object data) {
        this.state = state;
        this.msg = msg;
        this.data = data;
    }

    public static Result succ(Object data){
        return new Result(200,"成功！",data);
    }

    public static Result fail(){return new Result(400,"错误",null);}

    public static Result fail(String msg){
        return new Result(400,msg,null);
    }

}
